package com.gsh.dao;

import com.gsh.pojo.Abnormal;
import com.gsh.pojo.Electricity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AbnormalDao {

    //插入数据
    @Insert("insert into tb_abnormal(UID,MeasuringPoint,ADate,AMoment,ACondition,Capacity,FOM) " +
            "values(#{uid},#{measuringPoint},#{aDate},#{aMoment},#{aCondition},#{capacity},#{fom})")
    int insertAbnormal(Abnormal abnormal);

    //批量插入数据
    int insertBatchAbnormal(List<Abnormal> abnormals);

    //查询
    @Select("select * from tb_abnormal limit #{start},#{end};")
    List<Abnormal> queryAbnormal(int start,int end);
}
